package edu.bbu.commonproject.desktop.gui.view.swing.setup;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import edu.bbu.commonproject.desktop.gui.view.SetupInterface;

/**
 * The setup panel.
 */
public class SetupPanel  extends JPanel implements SetupInterface
{
	/** The header setup panel. */
	private HeaderSetupPanel headerSetupPanel;
	
	/** The center setup panel. */
	private CenterSetupPanel centerSetupPanel;
	
	/**
	 * The constructor.
	 */
	public SetupPanel()
	{
		this.setLayout(new BorderLayout());
		
		setComponents();
	}
	
	/**
	 * It sets up all the components.
	 */
	private void setComponents()
	{
		headerSetupPanel = new HeaderSetupPanel();
		centerSetupPanel = new CenterSetupPanel();

		this.add(headerSetupPanel, BorderLayout.NORTH);
		this.add(centerSetupPanel, BorderLayout.CENTER);
	}

	/**
	 * Gets the back to file button.
	 */
	public Object getBackToFilesButton()
	{
		return headerSetupPanel.getLogoSetupPanel().getBackToFilesButton();
	}

	/**
	 * Gets the privacy setup button.
	 */
	public Object getPrivatcySetupButton()
	{
		return headerSetupPanel.getLogoSetupPanel().getPrivatcySetupButton();
	}

	/**
	 * Gets the synchonized setup button.
	 */
	public Object getSynchronizeSetupButton()
	{
		return headerSetupPanel.getLogoSetupPanel().getSynchronizeSetupButton();
	}

	/**
	 * Moves to the front the panel. 
	 */
	public void moveToFront(String panelName)
	{
		centerSetupPanel.getCenterSetupCollectionPanel().moveToFront(panelName);
	}

	/**
	 * Gets auto synchronized setup.
	 */
	public Object getAutoSyncSetup()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getAutoSyncSetup();
	}

	/**
	 * The override of one way synchronization.
	 */
	public Object getOneWaySync()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getOneWaySync();
	}

	/**
	 * The override of two way synchronization.
	 */
	public Object getTwoWaySync()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getTwoWaySync();
	}

	/**
	 * The override of local synchronization folder field.
	 */
	public Object getLocalSyncFolderField()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getLocalSyncFolderField();
	}

	/**
	 * The override of server synchronization folder field.
	 */
	public Object getServerSyncFolderField()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getServerSyncFolderField();
	}

	/**
	 * The override of local directory synchronization choose.
	 */
	public Object getLocalsyncDirectoryChoose()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getLocalsyncDirectoryChoose();
	}

	/**
	 * The override of server synchronization directory choose.
	 */
	public Object getServersyncDirectoryChoose()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getServersyncDirectoryChoose();
	}

	/**
	 * Override the synchronization save button.
	 */
	public Object getSyncSaveButton()
	{	
		return centerSetupPanel.getCenterSetupCollectionPanel().getSyncSetupsPanel().getSaveButton();
	}

	/**
	 * Overrride the get new password field.
	 */
	public Object getNewPasswordField()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getPrivacySetupsPanel().getNewPasswordField();
	}

	/**
	 * Override the get new password confirmation field.
	 */
	public Object getNewPasswordConfirmationField()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getPrivacySetupsPanel().getNewPasswordConfirmationField();
	}

	/**
	 * Override the password error label.
	 */
	public Object getPasswordErrorLabel()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getPrivacySetupsPanel().getPasswordErrorLabel();
	}

	/**
	 * Override the delete user account.
	 */
	public Object getDeleteUserAccount()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getPrivacySetupsPanel().getDeleteUserAccount();
	}

	/**
	 * Override the current password field.
	 */
	public Object getCurrentPasswordField()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getPrivacySetupsPanel().getCurrentPasswordField();
	}

	/**
	 * Override the current password error label.
	 */
	public Object getCurrentPasswordErrorLabel()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getPrivacySetupsPanel().getCurrentPasswordErrorLabel();
	}

	/**
	 * Override the privacy save button.
	 */
	public Object getPrivacySaveButton()
	{
		return centerSetupPanel.getCenterSetupCollectionPanel().getPrivacySetupsPanel().getSaveButton();
	}

	/**
	 * Override the logout menu item.
	 */
	public Object getLogoutMenuItem()
	{
		return headerSetupPanel.getLogoutMenuItem();
	}

	/**
	 * Override the exit menu item.
	 */
	public Object getExitMenuItem()
	{
		return headerSetupPanel.getExitMenuItem();
	}

	/**
	 * Override the help menu item.
	 */
	public Object getHelpMenuItem()
	{
		return headerSetupPanel.getHelpMenuItem();
	}

	/**
	 * Override the about menu item.
	 */
	public Object getAboutMenuItem()
	{
		return headerSetupPanel.getAboutMenuItem();
	}
	
	
}
